#pragma once

#include <inttypes.h>

#define UNIT_METERS 6378100
#define UNIT_FEET 20925524.9
#define UNIT_KM 6378.1
#define UNIT_MI 3963.1676
#define LEFT false
#define RIGHT true

class Coord
{
protected:
	double lat,lon;
public:
	Coord();
	Coord(double dlat, double dlon);
	void maked(double lat,double lon);
	void maker(double lat,double lon);
	double latd() const;
	double lond() const;
	double latr() const;
	double lonr() const;
	double dist(const Coord &c, double unit) const;
	double bearing(const Coord &c) const;
	bool dir(const Coord &c, double dir) const;
	double angle(const Coord &c, double dir) const;
	static bool turnTo(double from,double to);
	static double angleTo(double from,double to);
};